


function editAddress(){
	
	$('#buttonjs').hide();
	$('#buttonjs2').show();
	
	var order_id = $('#order_id').val();

	
	$.post("http://batteryservice.net/index.php?m=Index&a=edit", { orderid: order_id},
			   function(data){
					$('#tbl_address').hide();
					$('#tbl_address').after(data);
					
			   });
}

function showLoading(type){
	$('#tbl_address').after("<div id='load_" + type + "'></div>");
}

function submitAddress(){
	var update_id_submit = $('#order_id_submit').val();
	var update_firstname = $('#firstname').val();
	var update_lastname = $('#lastname').val();
	var update_Firmenname = $('#Firmenname').val();
	var update_address1 = $('#address1').val();
	var update_address2 = $('#address2').val();
	var update_zipcode = $('#zipcode').val();
	var update_zipcode2 = $('#zipcode2').val();
	var update_state = $('#state').val();
	var update_city = $('#city').val();
	var update_country = $('#country').val();
	
	//var update_Telefon = $('#Telefon').val();
	var update_night_phone_a = $('#night_phone_a').val();
	var update_night_phone_b = $('#night_phone_b').val();
	var update_night_phone_c = $('#night_phone_c').val();
	var update_email = $('#email').val();

	//alert(update_country);
	$.post("http://batteryservice.net/index.php?m=Index&a=edit", { orderidsubmit: update_id_submit, firstname: update_firstname, lastname: update_lastname, Firmenname: update_Firmenname, address1: update_address1, address2: update_address2, zipcode: update_zipcode, zipcode2: update_zipcode2, state: update_state, city: update_city, country: update_country, night_phone_a: update_night_phone_a, night_phone_b: update_night_phone_b, night_phone_c: update_night_phone_c, email: update_email},
			   function(data){
					$('#address').remove();
					//alert(data);
					$('#ajxareturn').html(data);
					$('#tbl_address').show();
					$('#buttonjs2').hide();
					$('#buttonjs').show();
					//window.location.reload();
					window.location.href="http://batteryservice.net/index.php?m=Index&a=sendorder";

					
   });
}


function delsession(){
	$.post("http://batteryservice.net/index.php?m=Index&a=delsessions");
	//alert("成功");
}